<a class="logo" href="<?php echo (Yii::app()->user->id ? $this->createUrl('/transaction') : $this->createUrl('/index.php')); ?>">
	<?php if (Yii::app()->user->getSelectedAgency() !== null): ?>
		<?php if (Yii::app()->user->getSelectedAgency()->getLogo() != null && Yii::app()->user->id > 0): ?>
			<img src="<?php echo Yii::app()->user->getSelectedAgency()->getLogo(); ?>" height="73" style="margin-top: 5px;" />
		<?php elseif (Yii::app()->user->checkModuleAccess('Prestige.WhiteLabel') && Yii::app()->user->model->agency->settings['WhiteLabel']['SystemName']): ?>
			<div class="appname"><?php echo Yii::app()->user->getSelectedAgency()->settings['WhiteLabel']['SystemName']; ?></div>
		<?php else: ?>
			<img src="/images/logo_prestige_grey_v1_200x73.png" width="200" style="margin-left: -10px;" />
		<?php endif; ?>
	<?php else: ?>
		<img src="/images/logo_prestige_grey_v1_200x73.png" width="200" style="margin-left: -10px;" />
	<?php endif; ?>
</a>